import { get, post, put, del } from "../utils/request";

export function listApi(page = 1) {
  return get("/api/v1/admin/products", { page });
}

export function createAip(data) {
  return post("/api/v1/admin/products", data);
}

export function getById(id) {
  return get(`/api/v1/admin/products/${id}`);
}

export function modifyOne(id, data) {
  return put(`/api/v1/admin/products/${id}`, data);
}

export function delOne(id) {
  return del(`/api/v1/admin/products/${id}`);
}
